import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { BillComponent } from './bill/bill.component';
import { RouterModule, Routes } from '@angular/router';
import { NgxsModule } from '@ngxs/store';
import { LogisticsState } from './store/logistics.state';
import { ListComponent } from './list/list.component';
import { NzDescriptionsModule } from 'ng-zorro-antd/descriptions';
import { NzBadgeModule } from 'ng-zorro-antd/badge';
import { NzResultModule } from 'ng-zorro-antd/result';
import { NzButtonModule } from 'ng-zorro-antd/button';
import { NzGridModule } from 'ng-zorro-antd/grid';
import { NzTableModule } from 'ng-zorro-antd/table';
import { NzDividerModule } from 'ng-zorro-antd/divider';
import { LogisticsStatusPipe } from './logistics-status.pipe';

const routes: Routes = [
  {path: '', redirectTo: 'list', pathMatch: 'full'},
  {path: 'list', component: ListComponent},
  {path: 'bill', component: BillComponent},
];

@NgModule({
  declarations: [
    BillComponent,
    ListComponent,
    LogisticsStatusPipe,
  ],
  imports: [
    CommonModule,
    RouterModule.forChild(routes),
    NgxsModule.forFeature([LogisticsState]),
    NzDescriptionsModule,
    NzBadgeModule,
    NzResultModule,
    NzButtonModule,
    NzGridModule,
    NzTableModule,
    NzDividerModule,
  ],
})
export class LogisticsModule {
}
